package huahua.microservicesimpleconsumermovie;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
/*称为服务客户端被注册中心发现*/
@EnableDiscoveryClient
@EnableFeignClients(basePackages = "huahua.microservicesimpleconsumermovie.remote")
/*启用Hystrix DashBoard 和熔断器*/
@EnableHystrixDashboard
@EnableCircuitBreaker
public class MicroserviceSimpleConsumerMovieApplication {

    public static void main(String[] args) {
        SpringApplication.run(MicroserviceSimpleConsumerMovieApplication.class, args);
    }
}
